Design system.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

15 lines
354 B

  1. import {NextApiHandler} from 'next';
  2. import {readFile} from 'fs/promises';
  3. const handler: NextApiHandler = async (req, res) => {
  4. const typedocJson = await readFile('./.data/typedoc-data.json', 'utf-8');
  5. const typedocData = JSON.parse(typedocJson);
  6. res.json(
  7. typedocData.children.map((c) => ({
  8. name: c.name,
  9. }))
  10. );
  11. };
  12. export default handler;